# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-jupyter_core
pkgver=4.11.1
pkgrel=0
pkgdesc="Core Jupyter functionality"
url="https://github.com/jupyter/jupyter_core"
arch="noarch"
license="BSD-3-Clause"
depends="py3-traitlets"
makedepends="py3-hatchling py3-build py3-installer"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/jupyter/jupyter_core/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/jupyter_core-$pkgver"

build() {
	python3 -m build --no-isolation --wheel
}

check() {
	pytest \
		--deselect jupyter_core/tests/test_command.py::test_not_on_path \
		--deselect jupyter_core/tests/test_command.py::test_path_priority \
		--deselect jupyter_core/tests/test_paths.py::test_jupyter_path_prefer_env \
		--deselect jupyter_core/tests/test_paths.py::test_jupyter_path_user_site \
		--deselect jupyter_core/tests/test_paths.py::test_jupyter_path_no_user_site \
		--deselect jupyter_core/tests/test_command.py::test_argv0
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/jupyter_core-$pkgver-py3-none-any.whl
}

sha512sums="
3a2a6b33bd188389bffbcda8c03db5da9a8e330134ae1d63d405387a3b69731857697909a2ab80774a372acd427f8dc043ac48e47f67356d9f217507af11b6b1  py3-jupyter_core-4.11.1.tar.gz
"
